package cn.edu.xmist.beandifinition;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author zhongjinbin 2021/5/4
 * @since 1.0.0
 */
public class Test {
    public static void main(String[] args) {
        /**
         * ac为Spring容器,代表Spring的启动过程
         */
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppApplication.class);
        System.out.println("ac.getBean(X.class) = " + ac.getBean(Y.class));
        System.out.println("ac.getBean(X.class) = " + ac.getBean(Y.class));
    }
}
